//样式
require('./ad.less')
// require('../../assets/fonts/iconfont.css')
let dom = require('../../utils/dom.js')

//js代码

// console.log('广告页');

dom.ready(function () {
    window.setInterval(function () {
        let num = dom.getEle('#conutDown').innerHTML;
        num = num - 1;
        dom.getEle('#conutDown').innerHTML = num;
        if (num == 0) {
            location.href = 'login.html'
        }
        console.log(num);
    }, 1000)
})


// dom.addEvent('#btn', 'click', function () {
//     location.href = 'login.html'
// })

dom.getEle('#btn').addEventListener('click', function () {
    location.href = 'login.html'
})



// //暴露出去
// window.$utils={// key:value
//     //key: 表示自定义的属性  value: 表示具体绑定的功能名
//     // checkUser:checkUser
//     //如果：key和value名字相同,只写一个即可
//     fn:checkUser
// }
// 定时器
window.setInterval(function () {
    dom.getEle('#countDown').textContent -= 1
    if (dom.getEle('#countDown').textContent == 0) location.href = 'login.html'
}, 1000)


dom.addEvent('#jump', function () {
    location.href = 'login.html'
})
